package cn.doitedu.olap_doit13.controller;

import cn.doitedu.olap_doit13.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;

@Controller
public class DemoController {

    @RequestMapping("/sayhello")
    @ResponseBody
    public String hello(String name,String zhiwei){

        return "hello ,"+ name + " "+ zhiwei;
    }


    @RequestMapping("/getuser")
    @ResponseBody
    public User getUserByName(String name){
        User user = new User();
        user.set(name,18,"male","13656568787");
        return user;
    }

}
